home *** CD-ROM | disk | FTP | other *** search
- program TestExecSwap;
- uses
- Dos,ExecSwap; {Keep ExecSwap last}
- const
- SwapLoc : array[Boolean] of String[7] = ('on disk', 'in EMS');
- var
- Status : Word;
- begin
- UseEmsIfAvailable := True;
- if not InitExecSwap(HeapPtr, 'SWAP.$$$') then
- WriteLn('Unable to allocate swap space')
- else begin
- WriteLn('Allocated ', BytesSwapped, ' bytes ', SwapLoc[EmsAllocated]);
- SwapVectors;
- Status := ExecWithSwap(GetEnv('COMSPEC'), '');
- SwapVectors;
- WriteLn('Exec status: ', Status);
- end;
- end.